package com.atguigu.juc.daemonThread;

/**
 * @since 2021-07-14 23:48
 */
public class MainTest {
    public static void main(String[] args) {
        Thread aa = new Thread(() -> {
            System.out.println(Thread.currentThread().getName() + "::" + Thread.currentThread().isDaemon());
            while (true) {

            }
        }, "aa");
        aa.setDaemon(true);//设定为守护线程
        aa.start();
        System.out.println(Thread.currentThread().getName()+" over");
    }
}
